package com.nativetalk.dao;

import com.nativetalk.bean.live.TdNtLiveHisMemberHead;
import com.nativetalk.bean.live.TdNtLiveStudyDetail;
import com.nativetalk.bean.live.TdNtLiveStudyInsert;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by lizhun on 16/5/11.
 */
@MyBatisRepository
public interface TdNtLiveStudyDao {
    /**
     * @Purpose  购买直播
     * @version  2.1
     * @author   lizhun
     * @param    tdNtLiveStudyInsert
     * @return   void
     */
    public void addTdNtLiveStudyInsert(TdNtLiveStudyInsert tdNtLiveStudyInsert);
    /**
     * @Purpose  查找已购买直播用户头像
     * @version  2.1
     * @author   lizhun
     * @param    live_cou_his_id
     * @return   List<TdNtLiveHisMemberHead>
     */
    public List<TdNtLiveHisMemberHead> findTdNtLiveHisMemberHeads(int live_cou_his_id);
    /**
     * @Purpose  查找用户是否已经购买直播
     * @version  2.1
     * @author   lizhun
     * @param    map
     * @return   TdNtLiveStudyDetail
     */
    public TdNtLiveStudyDetail findTdNtLiveStudyDetail(Map<String,Integer> map);
    /**
     * @Purpose  根据自己变化记录查找直播购买记录
     * @version  2.1
     * @author   lizhun
     * @param    mfchg_id
     * @return   TdNtLiveStudyDetail
     */
    public TdNtLiveStudyDetail findTdNtLiveStudyDetailByMfchgId(int mfchg_id);
    /**
     * @Purpose  更新直播购买记录状态
     * @version  2.1
     * @author   lizhun
     * @param    tdNtLiveStudyDetail
     * @return   void
     */
    public void updateTdNtLiveStudyState(TdNtLiveStudyDetail tdNtLiveStudyDetail);

    public void updatePaymentStateByMfchgId(@Param("mfch_id") int mfch_id, @Param("payState") String payState);
}
